package com.nsl.my_youlai.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nsl.my_youlai.model.bo.DocxTemplateBo;
import com.nsl.my_youlai.model.dto.DocxTemplateDownloadInfoDto;
import com.nsl.my_youlai.model.entity.DocxTemplateEntity;
import com.nsl.my_youlai.model.form.TemplateDocxForm;
import com.nsl.my_youlai.model.query.DocxTemplatePageQuery;
import com.nsl.my_youlai.model.vo.docx_template.*;
import com.nsl.my_youlai.mystar.enums.NslEnumMime;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;
import java.util.List;

public interface DocxTemplateService extends IService<DocxTemplateEntity> {
    IPage<DocxTemplateVo4Page> getDocxTemplatePage(DocxTemplatePageQuery queryParams);

    DocxTemplateBo getDocxTemplateBoById(String docxTemplateUuid);

    DocxTemplateDetailVo getDocxTemplateDetailById(String uuid);

    File getTemplateFile(String uuid, NslEnumMime enumMime);

    UploadFileResultOfDocxTemplateDataSourceExcel uploadDocxTemplateDataSourceExcel(String docxUuid, MultipartFile file);

    DocxTemplateDownloadInfoDto buildDownloadInfoDtoOfBatchDocx(List<String> uploadFileUuidList, List<String> uploadFileNameList, String docxUuid) throws IOException;

    UploadFileResultOfDocxTemplate uploadDocxTemplate(MultipartFile file);

    void addDocxTemplate(TemplateDocxForm templateDocxForm) ;

    TemplateDocxForm getTemplateDocxForm(String docxUuid);

    File getTempFile(String originalFileName, String uuid);

    String removeUuidTag(String strWithUuid);

    List<DocxTemplateExportVo> listExportVo(DocxTemplatePageQuery queryParams);
}


